import request from '@/utils/request';

// 获取敏感词过滤设置
export function getSensitiveWordSettings(groupId) {
    return request({
        url: `/api/admin/sensitive-words/settings/${groupId}`,
        method: 'get'
    });
}

// 更新敏感词过滤设置
export function updateSensitiveWordSettings(groupId, data) {
    return request({
        url: `/api/admin/sensitive-words/settings/${groupId}`,
        method: 'put',
        data
    });
}

// 获取敏感词列表
export function getSensitiveWords(groupId, params) {
    return request({
        url: `/api/admin/sensitive-words/list/${groupId}`,
        method: 'get',
        params
    });
}

// 添加敏感词
export function addSensitiveWord(data) {
    return request({
        url: `/api/admin/sensitive-words`,
        method: 'post',
        data
    });
}

// 删除敏感词
export function deleteSensitiveWord(id) {
    return request({
        url: `/api/admin/sensitive-words/${id}`,
        method: 'delete'
    });
}

// 批量导入敏感词
export function batchImportSensitiveWords(data) {
    return request({
        url: `/api/admin/sensitive-words/batch`,
        method: 'post',
        data
    });
}

// 获取敏感词违规记录
export function getViolations(groupId, params) {
    return request({
        url: `/api/admin/sensitive-words/violations/${groupId}`,
        method: 'get',
        params
    });
} 